<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <title>Spring Security - GitHub Notifications</title>
    <meta charset="utf-8"/>
</head>
<body>
<div style="float: right" th:fragment="logout" sec:authorize="isAuthenticated()">
    <div style="float:left">
        <span style="font-weight:bold">User: </span><span sec:authentication="name"></span>
    </div>
    <div style="float:none">&nbsp;</div>
    <div style="float:right">
        <form action="#" th:action="@{/logout}" method="post">
            <input type="submit" value="Logout"/>
        </form>
    </div>
</div>
<h1>GitHub Notifications</h1>
<div>&nbsp;</div>
<hr>
<div>
    <form action="#" th:action="@{/}" method="get">
        <input type="submit" value="Home"/>
    </form>
</div>
<hr>
<div>
    <span style="font-weight:bold">List of Notifications:</span>
    <ul>
        <li th:each="notification : ${notifications}">
            <span style="font-weight:bold" th:text="${notification.repository.fullName}"></span>
            <span style="font-weight:bold" th:text="${notification.subject.title}"></span>
            <span style="font-weight:bold" th:text="${notification.subject.type}"></span>
            <span style="font-weight:bold" th:text="${notification.reason}"></span>
            <span style="font-weight:bold" th:text="${notification.updatedAt}"></span>
            <span style="font-weight:bold" th:text="${notification.lastReadAt}"></span>
        </li>
    </ul>
</div>
</body>
</html>